Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toyota: API is now gas/brake #1189

Draft
wants to merge 21 commits into
base: master
Choose a base branch
from
Draft

Toyota: API is now gas/brake #1189

wants to merge 21 commits into from

Conversation

sshane
Copy link
Contributor

@sshane sshane commented Aug 27, 2024

Needs testing, required for commaai/openpilot#33384

Past PRs for history: commaai/openpilot#29481 // commaai/openpilot#32753

@github-actions github-actions bot added car related to opendbc/car/ toyota labels Aug 27, 2024
@sshane sshane marked this pull request as draft August 27, 2024 06:02
Copy link
Contributor Author

@sshane sshane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

longcontrol.py resets the integral every time you disengage, so it may take a few seconds before it learns the offset on each engagement, issue should be on GM (gas/brake) as well

@sshane
Copy link
Contributor Author

sshane commented Sep 14, 2024

There is an undefined signal in CLUTCH that describes a very similar attribute, but may not be affected by the ACC_BRAKING bit?

BO_ 865 CLUTCH: 8 XXX
 SG_ TRUE_ACCEL_REQ : 48|16@1+ (0.0002,-6.5536) [0|4095] "" XXX

image

@sshane
Copy link
Contributor Author

sshane commented Sep 16, 2024

GEAR_PACKET_HYBRID->CAR_MOVEMENT might be some force exerted by the engine/hybrid motors, need to find the ICE equivelent. And BRAKE_PEDAL->BRAKE might be the actual brake percentage!

While reviewing some recent routes using the new signal in the CLUTCH message, I discovered why there might still be some sub optimal performance. It appears that PCM_CRUISE->ACCEL_NET is only accurate for braking (it's a simple scaling factor compared to a braking signal) and the new signal (CLUTCH->ACCEL_NET) is only accurate for acceleration with another scaling factor, but doesn't capture some small residual force the engine applies at low speed for creep, which is why the car kept releasing brakes too much coming to a stop (seen in the plot):

image

Here is switching the acceleration read back signals to show how each is only accurate for brake/gas:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
car related to opendbc/car/ DBC signals toyota
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant